<#include "/layout/header.ftl" />
<#import "/include/ui.ftl" as blue />

<script>

$(function()
{
	
});

function save_click()
{
	$.simpleValid("#div_form", function(obj)
	{
		$.simpleAjax("/base/user/bank_card_save", obj, function(o)
		{
			$.successAlert("保存成功", "save_success()", 2000);
		});
	});
}
function save_success()
{
	window.location = "${path}/base/user/bank_card_list?userId=${model.userId!}";
}
</script>

<div class="am-form am-form-horizontal am-cf am-margin" id="div_form">
<input type="hidden" name="id" value="${model.id!}"/>

	<fieldset>
		<legend>查看银行卡</legend>
		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">银行代码</label>
				<div class="am-u-md-9 am-u-end">
					<input type="text" class="am-form-field am-radius" value="${model.bankCode!}" readonly />
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">银行名称</label>
				<div class="am-u-md-9 am-u-end">
					<input type="text" class="am-form-field am-radius" value="${model.bankName!}" readonly />
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">持有人</label>
				<div class="am-u-md-9 am-u-end">
					<input type="text" class="am-form-field am-radius" value="${model.owner!}" readonly />
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">银行卡号</label>
				<div class="am-u-md-9 am-u-end">
					<input type="text" class="am-form-field am-radius" value="${model.bankNo!}" readonly />
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">手机号码</label>
				<div class="am-u-md-9 am-u-end">
					<input type="text" class="am-form-field am-radius" value="${model.mobile!}" readonly />
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">有效期</label>
				<div class="am-u-md-9 am-u-end">
					<input type="text" class="am-form-field am-radius" value="${(model.expireDate?date)!}" readonly />
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">正面图片</label>
				<div class="am-u-md-9 am-u-end">
					<#if model.facePicUrl??>
						<img src="${model.facePicUrl!}" class="am-img-responsive">
					</#if>
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">背面图片</label>
				<div class="am-u-md-9 am-u-end">
					<#if model.backPicUrl??>
						<img src="${model.backPicUrl!}" class="am-img-responsive">
					</#if>
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">状态</label>
				<div class="am-u-md-9 am-u-end">
					<select class="am-form-field am-radius" data-am-selected="{'btnWidth': '120px'}">
						<@blue.select list=map.state value=(model.state.index)!"0" />
					</select>
				</div>
			</div>
		</div>

		<div class="am-u-md-6">
			<div class="am-form-group">
				<label class="am-u-md-2 am-form-label am-padding-left-0 am-padding-right-0">是否认证</label>
				<div class="am-u-md-9 am-u-end">
					<select class="am-form-field am-radius" data-am-selected="{'btnWidth': '120px'}">
						<@blue.select list=map.type value=(model.state.auth)!"0" />
					</select>
				</div>
			</div>
		</div>

		<div class="am-u-md-12 am-text-center div_btn">
			<#--<a href="javascript:void(0)" onclick="save_click()" class="am-btn am-btn-primary am-radius">保存</a>-->
			<a href="javascript:void(0)" onclick="save_success()" class="am-btn am-btn-default am-radius am-margin-left">返回</a>
		</div>
	</fieldset>
</div>

<#include "/layout/footer.ftl" />